Optimal. Leaf size=135 \[ -\frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x) \sqrt {\sec (c+d x)}}{d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.36, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.162, Rules used = {4087, 4023, 3808, 206, 3801, 215} \[ -\frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x) \sqrt {\sec (c+d x)}}{d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 215
Rule 3801
Rule 3808
Rule 4023
Rule 4087
Rubi steps
\begin {align*} \int \frac {A+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {\sqrt {\sec (c+d x)} \left (-\frac {a A}{2}+\frac {1}{2} a C \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{a}\\ &=\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}+(-A-C) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx+\frac {C \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{a}\\ &=\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}-\frac {(2 C) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a d}+\frac {(2 (A+C)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 C \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sqrt {\sec (c+d x)} \sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.44, size = 504, normalized size = 3.73 \[ -\frac {\tan (c+d x) \left (\frac {8 A}{\sqrt {\frac {1}{\cos (c+d x)+1}}}-8 A \sqrt {\sec (c+d x)} \sqrt {\sec (c+d x)+1}+\sqrt {2} A \sqrt {\tan ^2(c+d x)} \log \left (-3 \sec ^2(c+d x)-2 \sec (c+d x)-2 \sqrt {2} \sqrt {\tan ^2(c+d x)} \sqrt {\sec (c+d x)+1} \sqrt {\sec (c+d x)}+1\right )-\sqrt {2} A \sqrt {\tan ^2(c+d x)} \log \left (-3 \sec ^2(c+d x)-2 \sec (c+d x)+2 \sqrt {2} \sqrt {\tan ^2(c+d x)} \sqrt {\sec (c+d x)+1} \sqrt {\sec (c+d x)}+1\right )-8 C \sqrt {\tan ^2(c+d x)} \log \left (\sec ^{\frac {3}{2}}(c+d x)+\sqrt {\sec (c+d x)}+\sqrt {\tan ^2(c+d x)} \sqrt {\sec (c+d x)+1}\right )+\sqrt {2} C \sqrt {\tan ^2(c+d x)} \log \left (-3 \sec ^2(c+d x)-2 \sec (c+d x)-2 \sqrt {2} \sqrt {\tan ^2(c+d x)} \sqrt {\sec (c+d x)+1} \sqrt {\sec (c+d x)}+1\right )-\sqrt {2} C \sqrt {\tan ^2(c+d x)} \log \left (-3 \sec ^2(c+d x)-2 \sec (c+d x)+2 \sqrt {2} \sqrt {\tan ^2(c+d x)} \sqrt {\sec (c+d x)+1} \sqrt {\sec (c+d x)}+1\right )+8 C \sqrt {\tan ^2(c+d x)} \log (\sec (c+d x)+1)\right )}{4 d (\sec (c+d x)-1) \sqrt {\sec (c+d x)+1} \sqrt {a (\sec (c+d x)+1)}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 498, normalized size = 3.69 \[ \left [\frac {4 \, A \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left (C \cos \left (d x + c\right ) + C\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {\sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}}}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {\sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) + 2 \, A \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left (C \cos \left (d x + c\right ) + C\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{a d \cos \left (d x + c\right ) + a d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \sec \left (d x + c\right )^{2} + A}{\sqrt {a \sec \left (d x + c\right ) + a} \sqrt {\sec \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.82, size = 273, normalized size = 2.02 \[ \frac {\left (-C \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+C \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+2 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, A \sin \left (d x +c \right )+2 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-4 A \cos \left (d x +c \right )+4 A \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{2 d \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.73, size = 580, normalized size = 4.30 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + C \sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \sqrt {\sec {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________